/*内核模板 作者:yywd_123
* 该文件包含内核主函数
*/

#include "EXLoader.h"

void DrawPixel(BootInfo *BInfo, uint32_t x, uint32_t y, uint32_t color)
{
  *(BInfo->Vinfo.fb + (BInfo->Vinfo.pitch * y + x)) = color;
}

void KernelMain(BootInfo *BInfo)
{
  BInfo->Vinfo.fb = (uint32_t*)BInfo->Vinfo.fbAddress;
  for (int i = 0; i < BInfo->Vinfo.Screen_height; ++i)
  {
    for (int j = 0; j < BInfo->Vinfo.Screen_width; ++j)
    {
      DrawPixel(BInfo, j, i, 0xff008080);   //颜色为argb格式
    }
  }

  while (1);
}